class DisruptorFlameDamType extends DamTypeLinkPlasma
	placeable;

var class<xEmitter> DeathEmitter;


replication
{
    reliable if (Role == ROLE_Authority)
	DrawDeathEffect;
}


static function class<Effects> GetPawnDamageEffect( vector HitLocation, float Damage, vector Momentum, Pawn Victim, bool bLowDetail )
{
	DrawDeathEffect(Victim);
	return none;
}

static function DrawDeathEffect(Pawn Victim)
{
	if ( xPawn(Victim) != None )
	{
		if ( xPawn(Victim).SkeletonMesh != None )
		{
//				SetOnFire( xPawn(Victim) );
		}
	}


//	if(Victim.Health<=0)
//	{
//		Victim.spawn(class'DesintegratorSmokeRing', , , Victim.Location + vect(0, 0, 10), Victim.Rotation);
//	}
}

//static function GetHitEffects(out class<xEmitter> HitEffects[4], int VictemHealth )
//{
//    HitEffects[0] = class'DisruptorBodyFlame';
//    HitEffects[1] = class'DisruptorBodyFlame';
//}

static function SetOnFire( xPawn P )
{
	local float z;
	local name bonename;
	local DisruptorBodyFlame flame;

	z = Frand();
	flame = P.Spawn( class'DisruptorBodyFlame', P,, P.Location, P.Rotation );


		if( z < 0.10)
			boneName = 'Bip01 L Calf';
		else if (z < 0.20)
			boneName = 'Bip01 R Calf';
		else if (z < 0.30)
			boneName = 'Bip01 R Forearm';
		else if (z < 0.40)
			boneName = 'Bip01 L Forearm';
		else if (z < 0.50)
			boneName = 'bip01 spine';
		else if (z < 0.60)
			boneName = 'Bip01 L UpperArm';
		else if (z < 0.70)
			boneName = 'Bip01 R UpperArm';
		else if (z < 0.80)
			boneName = 'bip01 spine2';
		else
			boneName = 'Bip01 Head';

	if (!P.AttachToBone(flame,bonename))
		{
			if (!P.AttachToBone(flame,'Bip01 Head'))
			{
				flame.Destroy();
				flame.Kill();
			}
		}

}

defaultproperties
{
     WeaponClass=Class'Taskforces.TFDisruptor'
     DeathString="%k's Disruptor thoroughly barbequed %o ."
     FemaleSuicide="%o burnt herself."
     MaleSuicide="%o burnt himself."
     bSkeletize=True
     bCauseConvulsions=True
     bCausesBlood=False
     bKUseOwnDeathVel=True
     DamageOverlayTime=2.000000
     KDamageImpulse=0.000000
     KDeathVel=100.000000
     KDeathUpKick=-20.000000
     VehicleDamageScaling=0.500000
     VehicleMomentumScaling=0.100000
}
